<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <link rel="stylesheet" href="style/style.css" />
    <title>DEMO</title>
</head>

<body>
    <div class="title">zg_wechat_sdk</div>
    <!-- 内容 -->
    <div class="auth_content">
        微信网页授权
        <p>
            <script>
                document.write(location.href)    
            </script>
        </p>
    </div>

    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script type="text/javascript" src="dist/zg_wechat_sdk.js"></script>
    <script type="text/javascript">
        if (ZGWeChatSDK.utils.getQueryString('code') == null) {
            var config = {
                appID: 'wxa2840d0838300e73',
                user_info_url: 'http://download02.chinanorth.cloudapp.chinacloudapi.cn/api/get-userinfo',
                signature_url: 'http://download02.chinanorth.cloudapp.chinacloudapi.cn/api/get-signature'
            }
            var sdk = ZGWeChatSDK.getInstance(config)
            sdk.gotoAuthPage()
        }

    </script>
</body>

</html>